/* 
 * File:   VectorToScalarDataset.h
 * Author: cjjonker
 *
 * Created on 4 januari 2013, 16:57
 */

#ifndef VECTORTOSCALARDATASET_H
#define	VECTORTOSCALARDATASET_H

#include "ScalarDataset.h"
#include "VectorDataset.h"
#include "Vector.h"


class VectorToScalarDataset: public ScalarDataset {

    
    VectorDataset* d_dataset;
    int d_type;
    
    
public:
    
    enum Type
    {
        Magnitude,
        Angle,
        TypeCount
    };
    VectorToScalarDataset(VectorDataset* set);
    VectorToScalarDataset(VectorDataset* set, Type t);
    
    double getData(int idx);
    double getData(int idx, int t);
    Vector2f getVectorData(int idx);
    Vector2f getVectorData(int idx, int t);
    
    double getMax(int t_depth, int slice_dt);
    double getMin(int t_depth, int slice_dt);
    
private:
    

};

inline double VectorToScalarDataset::getData(int idx) { return getData(idx, 0); }

inline Vector2f VectorToScalarDataset::getVectorData(int idx) { return getVectorData(idx, 0); }

inline Vector2f VectorToScalarDataset::getVectorData(int idx, int t) { return d_dataset->getData(idx, t); }

#endif	/* VECTORTOSCALARDATASET_H */

